package copyproject.app;

import java.io.File;
import java.io.IOException;

public class AppUtils {

	public void copyRepertoire(String srcDirPath, String destDirPath)
			throws IOException {

		File srcDir = new File(srcDirPath);

		File destDir = new File(destDirPath);

		long currentTimeMillisStart = System.currentTimeMillis();

		FileUtilsApp.copyDirectoryToDirectory(srcDir, destDir);

		long currentTimeMillisEnd = System.currentTimeMillis();

		long tempsEcoule = (currentTimeMillisEnd - currentTimeMillisStart) / 1000;

		long tempsEcouleHeures = tempsEcoule / (60 * 60);

		long tempsEcouleHeuresRes = tempsEcoule % (60 * 60);

		long tempsEcouleMin = tempsEcouleHeuresRes / 60;

		long tempsEcouleMinRes = tempsEcouleHeuresRes % 60;

		long tempsEcouleSec = tempsEcouleMinRes;

		System.out.println();

		System.out.println("Copie Termine");

		System.out.print("Temps ecoule:" + String.valueOf(tempsEcouleHeures)
				+ "h");
		System.out.print(String.valueOf(tempsEcouleMin) + "m");
		System.out.print(String.valueOf(tempsEcouleSec) + "s");
	}
}
